package com.iplant.wms.service.po.brm;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.base.utils.general.CalendarTool;

import java.io.Serializable;
import java.util.Calendar;


/**
 * 上架详情
 *
 * @author ShrisJava
 */
@DBBasePO(TableName = "brm_shelvesprop",
        CheckName = {"RuleID,Name", "RuleID,Code"},

        Schemas = DBSchemas.WMS, CodeAuto = true, CodePrefix = "BSP-")
public class BRMShelvesProp extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField(CheckValue = true)
    public int RuleID = 0;

    /**
     * 包装模板代码
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like, ParamName2 = "RuleCodeEQ")
    @DBJoin(name = "Code", tableName = "brm_shelvesrule", Schemas = DBSchemas.WMS, tableAsName = "r1", MainTableField = "RuleID")
    public String RuleCode = "";

    /**
     * 主单位 内包装 箱 栈板
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "brm_shelvesrule", Schemas = DBSchemas.WMS, tableAsName = "r1", MainTableField = "RuleID")
    public String RuleName = "";


    @DBCondition
    @DBField(CheckValue = true)
    public int StoreID = 0;


    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code", tableName = "wms_store", Schemas = DBSchemas.WMS, tableAsName = "s1", MainTableField = "StoreID")
    public String StoreCode = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "wms_store", Schemas = DBSchemas.WMS, tableAsName = "s1", MainTableField = "StoreID")
    public String StoreName = "";


    /**
     * 即规则代码
     */
    @DBCondition
    @DBField
    public int TypeID = 0;

    @DBCondition
    @DBField
    public int StoreAreaID = 0;

    /**
     * 目标库区
     */
    @DBJoin(name = "Code", tableName = "wms_store_area", Schemas = DBSchemas.WMS, tableAsName = "s2", MainTableField = "StoreAreaID")
    public String StoreAreaCode = "";

    /**
     * 目标库区
     */
    @DBJoin(name = "Name", tableName = "wms_store_area", Schemas = DBSchemas.WMS, tableAsName = "s2", MainTableField = "StoreAreaID")
    public String StoreAreaName = "";

    @DBCondition
    @DBField
    public int OriginalStationID = 0;

    /**
     * 原始库位
     */
    @DBJoin(name = "Code", tableName = "wms_store_station", Schemas = DBSchemas.WMS, tableAsName = "s4", MainTableField = "OriginalStationID")
    public String OriginalStationCode = "";

    /**
     * 原始库位
     */
    @DBJoin(name = "Name", tableName = "wms_store_station", Schemas = DBSchemas.WMS, tableAsName = "s4", MainTableField = "OriginalStationID")
    public String OriginalStationName = "";

    @DBCondition
    @DBField
    public int TargetShelfID = 0;

    /**
     * 目标货架
     */
    @DBJoin(name = "Code", tableName = "wms_store_shelf", Schemas = DBSchemas.WMS, tableAsName = "s3", MainTableField = "TargetShelfID")

    public String TargetShelfCode = "";

    /**
     * 目标货架
     */
    @DBJoin(name = "Name", tableName = "wms_store_shelf", Schemas = DBSchemas.WMS, tableAsName = "s3", MainTableField = "TargetShelfID")

    public String TargetShelfName = "";

    @DBCondition
    @DBField
    public int TargetStationID = 0;

    /**
     * 目标库位
     */
    @DBJoin(name = "Code", tableName = "wms_store_station", Schemas = DBSchemas.WMS, tableAsName = "s5", MainTableField = "TargetStationID")

    public String TargetStationCode = "";

    /**
     * 目标库位
     */
    @DBJoin(name = "Name", tableName = "wms_store_station", Schemas = DBSchemas.WMS, tableAsName = "s5", MainTableField = "TargetStationID")

    public String TargetStationName = "";


    /**
     * 库位限制  多选用，隔开
     */
    @DBCondition
    @DBField
    public String StationLimit = "";
    /**
     * 空间限制  多选用，隔开
     */
    @DBCondition
    @DBField
    public String SpaceLimit = "";


    /**
     * 枚举  ASN Type
     */
    @DBCondition
    @DBField
    public int BillTypeID = 0;

    @DBJoin(name = "Name", tableName = "wms_bill_type", Schemas = DBSchemas.WMS, tableAsName = "bt1", MainTableField = "BillTypeID")

    public String BillTypeName = "";

    /**
     * 包装级别
     */
    @DBField
    public String PackageLevel = "";

    /**
     * 库位使用类型  1 箱 2件
     */
    @DBCondition
    @DBField
    public int PickingMode = 0;


    /**
     * 库位类型
     */
    @DBCondition
    @DBField
    public int StationTypeID = 0;
    public String StationTypeName = "";

    /**
     * 循环级别
     */
    @DBField
    public int LoopTypeID = 0;


    /**
     * 枚举 库位处理
     */
    @DBField
    public int HandlerTypeID = 0;

    /**
     * 最大混放物料数量
     */
    @DBField
    public int MaxMixMaterial = 1;

    /**
     * 最大混放批次数量
     */
    @DBField
    public int MaxMixBatch = 1;


    @DBField
    public int SuccessStepID = 0;

    @DBField
    public int ErrorStepID = 0;

    /**
     * 指定库区产品库位个数限制
     */
    @DBField
    public int SameLimits = 20;

    @DBField
    public String BatchRuleCode = "";
    /**
     * 批次属性01 生产日期
     */

    @DBField
    public Calendar ProductDate = CalendarTool.getBasicDate();

    /**
     * 批次属性02 失效日期
     */
    @DBField
    public Calendar ExpireDate = CalendarTool.getBasicDate();


    /**
     * 批次属性03 入库日期
     */
    @DBField
    public Calendar StockDate = CalendarTool.getBasicDate();
    @DBField
    public String LotAttr04 = "";
    @DBField
    public String LotAttr05 = "";
    @DBField
    public String LotAttr06 = "";
    @DBField
    public String LotAttr07 = "";
    @DBField
    public String LotAttr08 = "";
    @DBField
    public String LotAttr09 = "";
    @DBField
    public String LotAttr10 = "";
    @DBField
    public String LotAttr11 = "";
    @DBField
    public String LotAttr12 = "";


    @JsonProperty("RuleID")
    public int getRuleID() {
        return RuleID;
    }

    public void setRuleID(int ruleID) {
        RuleID = ruleID;
    }

    @JsonProperty("RuleCode")
    public String getRuleCode() {
        return RuleCode;
    }

    public void setRuleCode(String ruleCode) {
        RuleCode = ruleCode;
    }

    @JsonProperty("RuleName")
    public String getRuleName() {
        return RuleName;
    }

    public void setRuleName(String ruleName) {
        RuleName = ruleName;
    }

    @JsonProperty("StoreID")
    public int getStoreID() {
        return StoreID;
    }

    public void setStoreID(int storeID) {
        StoreID = storeID;
    }

    @JsonProperty("StoreCode")
    public String getStoreCode() {
        return StoreCode;
    }

    public void setStoreCode(String storeCode) {
        StoreCode = storeCode;
    }

    @JsonProperty("StoreName")
    public String getStoreName() {
        return StoreName;
    }

    public void setStoreName(String storeName) {
        StoreName = storeName;
    }

    @JsonProperty("TypeID")
    public int getTypeID() {
        return TypeID;
    }

    public void setTypeID(int typeID) {
        TypeID = typeID;
    }

    @JsonProperty("StoreAreaID")
    public int getStoreAreaID() {
        return StoreAreaID;
    }

    public void setStoreAreaID(int storeAreaID) {
        StoreAreaID = storeAreaID;
    }

    @JsonProperty("StoreAreaCode")
    public String getStoreAreaCode() {
        return StoreAreaCode;
    }

    public void setStoreAreaCode(String storeAreaCode) {
        StoreAreaCode = storeAreaCode;
    }

    @JsonProperty("StoreAreaName")
    public String getStoreAreaName() {
        return StoreAreaName;
    }

    public void setStoreAreaName(String storeAreaName) {
        StoreAreaName = storeAreaName;
    }

    @JsonProperty("OriginalStationID")
    public int getOriginalStationID() {
        return OriginalStationID;
    }

    public void setOriginalStationID(int originalStationID) {
        OriginalStationID = originalStationID;
    }

    @JsonProperty("OriginalStationCode")
    public String getOriginalStationCode() {
        return OriginalStationCode;
    }

    public void setOriginalStationCode(String originalStationCode) {
        OriginalStationCode = originalStationCode;
    }

    @JsonProperty("OriginalStationName")
    public String getOriginalStationName() {
        return OriginalStationName;
    }

    public void setOriginalStationName(String originalStationName) {
        OriginalStationName = originalStationName;
    }

    @JsonProperty("TargetStationID")
    public int getTargetStationID() {
        return TargetStationID;
    }

    public void setTargetStationID(int targetStationID) {
        TargetStationID = targetStationID;
    }

    @JsonProperty("TargetStationCode")
    public String getTargetStationCode() {
        return TargetStationCode;
    }

    public void setTargetStationCode(String targetStationCode) {
        TargetStationCode = targetStationCode;
    }

    @JsonProperty("TargetStationName")
    public String getTargetStationName() {
        return TargetStationName;
    }

    public void setTargetStationName(String targetStationName) {
        TargetStationName = targetStationName;
    }

    @JsonProperty("StationLimit")
    public String getStationLimit() {
        return StationLimit;
    }

    public void setStationLimit(String stationLimit) {
        StationLimit = stationLimit;
    }

    @JsonProperty("SpaceLimit")
    public String getSpaceLimit() {
        return SpaceLimit;
    }

    public void setSpaceLimit(String spaceLimit) {
        SpaceLimit = spaceLimit;
    }


    @JsonProperty("LoopTypeID")
    public int getLoopTypeID() {
        return LoopTypeID;
    }

    public void setLoopTypeID(int loopTypeID) {
        LoopTypeID = loopTypeID;
    }


    @JsonProperty("HandlerTypeID")
    public int getHandlerTypeID() {
        return HandlerTypeID;
    }

    public void setHandlerTypeID(int handlerTypeID) {
        HandlerTypeID = handlerTypeID;
    }

    @JsonProperty("MaxMixMaterial")
    public int getMaxMixMaterial() {
        return MaxMixMaterial;
    }

    public void setMaxMixMaterial(int maxMixMaterial) {
        MaxMixMaterial = maxMixMaterial;
    }

    @JsonProperty("MaxMixBatch")
    public int getMaxMixBatch() {
        return MaxMixBatch;
    }

    public void setMaxMixBatch(int maxMixBatch) {
        MaxMixBatch = maxMixBatch;
    }

    @JsonProperty("SuccessStepID")
    public int getSuccessStepID() {
        return SuccessStepID;
    }

    public void setSuccessStepID(int successStepID) {
        SuccessStepID = successStepID;
    }

    @JsonProperty("ErrorStepID")
    public int getErrorStepID() {
        return ErrorStepID;
    }

    public void setErrorStepID(int errorStepID) {
        ErrorStepID = errorStepID;
    }

    @JsonProperty("SameLimits")
    public int getSameLimits() {
        return SameLimits;
    }

    public void setSameLimits(int sameLimits) {
        SameLimits = sameLimits;
    }


    @JsonProperty("TargetShelfID")
    public int getTargetShelfID() {
        return TargetShelfID;
    }

    public void setTargetShelfID(int targetShelfID) {
        TargetShelfID = targetShelfID;
    }

    @JsonProperty("TargetShelfCode")
    public String getTargetShelfCode() {
        return TargetShelfCode;
    }

    public void setTargetShelfCode(String targetShelfCode) {
        TargetShelfCode = targetShelfCode;
    }

    @JsonProperty("TargetShelfName")
    public String getTargetShelfName() {
        return TargetShelfName;
    }

    public void setTargetShelfName(String targetShelfName) {
        TargetShelfName = targetShelfName;
    }


    @JsonProperty("ProductDate")
    public Calendar getProductDate() {
        return ProductDate;
    }

    public void setProductDate(Calendar productDate) {
        ProductDate = productDate;
    }

    @JsonProperty("ExpireDate")
    public Calendar getExpireDate() {
        return ExpireDate;
    }

    public void setExpireDate(Calendar expireDate) {
        ExpireDate = expireDate;
    }

    @JsonProperty("StockDate")
    public Calendar getStockDate() {
        return StockDate;
    }

    public void setStockDate(Calendar stockDate) {
        StockDate = stockDate;
    }

    @JsonProperty("LotAttr04")
    public String getLotAttr04() {
        return LotAttr04;
    }

    public void setLotAttr04(String lotAttr04) {
        LotAttr04 = lotAttr04;
    }

    @JsonProperty("LotAttr05")
    public String getLotAttr05() {
        return LotAttr05;
    }

    public void setLotAttr05(String lotAttr05) {
        LotAttr05 = lotAttr05;
    }

    @JsonProperty("LotAttr06")
    public String getLotAttr06() {
        return LotAttr06;
    }

    public void setLotAttr06(String lotAttr06) {
        LotAttr06 = lotAttr06;
    }

    @JsonProperty("LotAttr07")
    public String getLotAttr07() {
        return LotAttr07;
    }

    public void setLotAttr07(String lotAttr07) {
        LotAttr07 = lotAttr07;
    }

    @JsonProperty("LotAttr08")
    public String getLotAttr08() {
        return LotAttr08;
    }

    public void setLotAttr08(String lotAttr08) {
        LotAttr08 = lotAttr08;
    }

    @JsonProperty("LotAttr09")
    public String getLotAttr09() {
        return LotAttr09;
    }

    public void setLotAttr09(String lotAttr09) {
        LotAttr09 = lotAttr09;
    }

    @JsonProperty("LotAttr10")
    public String getLotAttr10() {
        return LotAttr10;
    }

    public void setLotAttr10(String lotAttr10) {
        LotAttr10 = lotAttr10;
    }

    @JsonProperty("LotAttr11")
    public String getLotAttr11() {
        return LotAttr11;
    }

    public void setLotAttr11(String lotAttr11) {
        LotAttr11 = lotAttr11;
    }

    @JsonProperty("LotAttr12")
    public String getLotAttr12() {
        return LotAttr12;
    }

    public void setLotAttr12(String lotAttr12) {
        LotAttr12 = lotAttr12;
    }


    @JsonProperty("StationTypeID")
    public int getStationTypeID() {
        return StationTypeID;
    }

    public void setStationTypeID(int stationTypeID) {
        StationTypeID = stationTypeID;
    }

    @JsonProperty("StationTypeName")
    public String getStationTypeName() {
        return StationTypeName;
    }

    public void setStationTypeName(String stationTypeName) {
        StationTypeName = stationTypeName;
    }

    @JsonProperty("BatchRuleCode")
    public String getBatchRuleCode() {
        return BatchRuleCode;
    }

    public void setBatchRuleCode(String batchRuleCode) {
        BatchRuleCode = batchRuleCode;
    }

    @JsonProperty("BillTypeID")
    public int getBillTypeID() {
        return BillTypeID;
    }

    public void setBillTypeID(int billTypeID) {
        BillTypeID = billTypeID;
    }

    @JsonProperty("BillTypeName")
    public String getBillTypeName() {
        return BillTypeName;
    }

    public void setBillTypeName(String billTypeName) {
        BillTypeName = billTypeName;
    }

    @JsonProperty("PackageLevel")
    public String getPackageLevel() {
        return PackageLevel;
    }

    public void setPackageLevel(String packageLevel) {
        PackageLevel = packageLevel;
    }

    @JsonProperty("PickingMode")
    public int getPickingMode() {
        return PickingMode;
    }

    public void setPickingMode(int pickingMode) {
        PickingMode = pickingMode;
    }
}
